/**   
* @Title:：RabbitClusterMsgDeliver.java 
* @Package ：com.example.deal.rabbit 
* @Description： TODO
* @author： Dustyone
* @date： 2019年4月4日 上午11:08:20  
*/
package com.example.deal.rabbit;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.support.MessageBuilder;

/** 
* @ClassName:：RabbitClusterMsgDeliver 
* @author ：Dustyone
* @date ：2019年4月4日 上午11:08:20  
*/

@EnableBinding(RabbitClusterChannelInterface.class)
public class RabbitClusterMsgDeliver {
	
	/**
	 * ASIA_CDS_BROKER_NOTIFY_WARNING
	 */
	@Autowired
	@Output(RabbitClusterChannelInterface.ASIA_CDS_BROKER_NOTIFY_WARNING)
	private MessageChannel asiaCdsBrokerWarningNotify;
	
	/**
	 * EURO_CDS_BROKER_NOTIFY_WARNING
	 */
	@Autowired
	@Output(RabbitClusterChannelInterface.EURO_CDS_BROKER_NOTIFY_WARNING)
	private MessageChannel euroCdsBrokerWarningNotify;
	
	/**
	 * ASIA_CDS_BROKER_NOTIFY_COMMON
	 */
	@Autowired
	@Output(RabbitClusterChannelInterface.ASIA_CDS_BROKER_NOTIFY_COMMON)
	private MessageChannel asiaCdsBrokerCommonNotify;
	
	/**
	 * 
	* @author： Dustyone
	* @Title：asiaCdsBrokerWarningNotifySendMsg 
	* @Description：TODO
	* @param ：@param msg 
	* @return ：void 
	* @throws
	 */
	public void asiaCdsBrokerWarningNotifySendMsg(String msg) {
		asiaCdsBrokerWarningNotify.send(MessageBuilder.withPayload(msg).build());
	}
	
	/**
	 * 	
	* @author： Dustyone
	* @Title：euroCdsBrokerWarningNotifySendMsg 
	* @Description：TODO
	* @param ：@param msg 
	* @return ：void 
	* @throws
	 */
	public void euroCdsBrokerWarningNotifySendMsg(String msg) {
		euroCdsBrokerWarningNotify.send(MessageBuilder.withPayload(msg).build());
	}
	
	/**
	 * 
	* @author： Dustyone
	* @Title：asiaCdsBrokerCommonNotifySendMsg 
	* @Description：TODO
	* @param ：@param msg 
	* @return ：void 
	* @throws
	 */
	public void asiaCdsBrokerCommonNotifySendMsg(String msg) {
		asiaCdsBrokerCommonNotify.send(MessageBuilder.withPayload(msg).build());
	}
	
}
